<template>
  <div>
    <n-h3>Nofitication</n-h3>
    <n-button type="primary" @click="handleShowNotification">
      useNotification
    </n-button>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { useNotification, NotificationOptions } from 'naive-ui'

export default defineComponent({
	name: 'Message',
	setup () {
		const notification = useNotification()
		const notificationContent: NotificationOptions = {
			content: 'Will be success',
			meta: 'I think so',
		}
		const handleShowNotification = () => {
			notification.success(notificationContent)
		}
		return {
			handleShowNotification,
		}
	},
})
</script>
